package entity

import (
	"gitee.com/mjun1833/buildnotification/model"
	"time"
)

const (
	TableNameTollgate = "tollgate"
)

type Tollgate struct {
	TollgateID     string                 `xorm:"tollgate_id not null pk default '' text"`
	Name           string                 `xorm:"name not null default '' text"`
	Longitude      float64                `xorm:"longitude default '-200'::real REAL"`
	Latitude       float64                `xorm:"latitude default '-200'::real REAL"`
	PlaceCode      string                 `xorm:"place_code not null default '' text"`
	Place          string                 `xorm:"place not null default '' text"`
	Status         model.StatusType       `xorm:"status not null default ''"`
	TollgateCat    model.TollgateType     `xorm:"tollgate_cat not null default 0 varchar(16)"`
	TollgateUsage  model.TollgateCat2Type `xorm:"tollgate_usage not null default 0 SMALLINT"`
	LaneNum        int                    `xorm:"lane_num not null default 0 SMALLINT"`
	OrgCode        string                 `xorm:"org_code not null default '' text"`
	ActiveTime     string                 `xorm:"active_time not null default '' text"`
	ExtendJson     string                 `xorm:"extend_json not null default '' text"`
	OrgID          string                 `xorm:"org_id not null default '' text"`
	ViewDatabaseID string                 `xorm:"view_database_id not null default '' text"`
	Ts             int64                  `xorm:"ts not null default 0 bigint"`
	Uts            time.Time              `xorm:"uts not null default now() text"`
}

func (t *Tollgate) TableName() string {
	return TableNameTollgate
}
